package com.seven.webhook.simple.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seven.webhook.simple.mapper.MonitorSimpleRuleMapper;
import com.seven.webhook.simple.model.MonitorSimpleRule;
import com.seven.webhook.simple.service.MonitorSimpleRuleService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author seven
 * @since 2020-11-13
 */
@Service
public class MonitorSimpleRuleServiceImpl extends ServiceImpl<MonitorSimpleRuleMapper,
        MonitorSimpleRule> implements MonitorSimpleRuleService {


    @Override
    public MonitorSimpleRule getByRuleName(String ruleName) {
        return getOne(new QueryWrapper<MonitorSimpleRule>().lambda()
                .eq(MonitorSimpleRule::getRuleName, ruleName));
    }
}
